package GenericMethod;

import java.awt.*;

import javax.swing.*;

public class SetDimension
{
	public void setBoundFrame(JFrame currentFrame, int width, int height)
	{
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //Get the screen size
		currentFrame.setBounds((screenSize.width - width) / 2, (screenSize.height - height) / 2, width, height); //Set main window dimensions automatically in the center
	}
}